package com.by.clone;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @version 1.0
 * @Author 彭彦彬
 * @Date 2025/4/9 20:21
 * @注释
 */
public class ShallowMain {
    public static void main(String[] args) throws CloneNotSupportedException {
        ShallowClone shallowClone=new ShallowClone(new int[]{1,2,3});
        ShallowClone cloned= (ShallowClone) shallowClone.clone();
        //修改对象的数组
        cloned.arr[0]=533521;
        System.out.println(shallowClone==cloned);
        System.out.println(shallowClone.arr[0]);
        System.out.println(cloned.arr[0]);
    }
}
